<html>
    <canvas id="canvas"></canvas>
    <textarea id="output" style="width: 100%;"></textarea>
    <script>
        var Module = {
            print: (function() {
                var element = document.getElementById('output');
                return function(text) {
                    element.value += text + "\n";
                }
            })(),
            canvas: (function() {
                var canvas = document.getElementById('canvas');
                return canvas;
            })()
        }
    </script>
    <script async type="text/javascript" src="rdp.js"></script>
</html>